package edu.mbb.cloud.nacos.listen;

public interface ConfigService {

    /**
     * Get config
     *
     * @param dataId    dataId
     * @param group     group
     * @return config value
     * @throws RuntimeException RuntimeException
     */
    String getConfig(String dataId, String group) throws RuntimeException;


    /**
     * Add a listener to the configuration, after the server modified the
     * configuration, the client will use the incoming listener callback.
     * Recommended asynchronous processing, the application can implement the
     * getExecutor method in the ManagerListener, provide a thread pool of
     * execution. If provided, use the main thread callback, May block other
     * configurations or be blocked by other configurations.
     *
     * @param dataId   dataId
     * @param group    group
     * @param listener listener
     * @throws RuntimeException RuntimeException
     */
    void addListener(String dataId, String group, Listener listener) throws Exception;



}